package javafx;

import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.stage.Screen;
import javafx.AreaTexto;
import javafx.scene.shape.Rectangle;
import javafx.scene.paint.Color;
import javafx.scene.paint.LinearGradient;
import javafx.scene.paint.Stop;
import javafx.scene.control.Button;
import fachada.Fachada;

/**
 * @author Henrique Fernandes
 */

/*Referencia a Classe AreaTexto*/
var areaTexto:AreaTexto = new AreaTexto;

/*Referencia a Classe ClassesEstaticas*/
var classesEstaticas:ClassesEstaticas = new ClassesEstaticas;

/*Background da Area das Classes estaticas*/
var backgroundContainerClasses = Rectangle {
    layoutY: 50;
    width: classesEstaticas.largura;
    height: classesEstaticas.altura;
    stroke: Color.BLACK;
    strokeWidth: 2;
    arcHeight:10;
    arcWidth: 10;
    fill: LinearGradient {
        startX: 125.0, startY: 0.0, endX: 225.0, endY: 0.0
        proportional: false
        stops: [
            Stop { offset: 0.0 color: Color.WHITE },
            Stop { offset: 1.0 color: Color.BEIGE }
            //Stop { offset: 0, color: Color.rgb(202, 202, 202) }
            //Stop { offset: 1, color: Color.rgb(97, 97, 97) }
        ]
    }
}

/*Botao que executa o codigo digitado*/
var botao = Button {
    layoutY: 10;
    text: "Executar"
    width: 80;
    height: 30;
    action: function() {
        classesEstaticas.colecaoClasses = Fachada.obterInstancia().getClasses("");
    }
}

Stage {
    title: "Aprendizagem de POO";
    width: Screen.primary.visualBounds.width;
    height: Screen.primary.visualBounds.height;
    scene: Scene {
        fill:Color.AZURE;
        content: [
            backgroundContainerClasses, areaTexto, classesEstaticas,botao
            
        ]
    }
}